﻿CREATE TABLE [entity].[Entity] (
    [EntityID]     INT          IDENTITY (1, 1) NOT NULL,
    [EntityTypeID] INT          NULL,
    [CreatedBy]    VARCHAR (50) NULL,
    [CreatedDate]  DATETIME     NULL,
    [UpdatedBy]    VARCHAR (50) NULL,
    [UpdatedDate]  DATETIME     NULL,
    [EndDate]      DATETIME     NULL,
    CONSTRAINT [PK_Entity] PRIMARY KEY CLUSTERED ([EntityID] ASC),
    CONSTRAINT [FK_Entity_EntityType] FOREIGN KEY ([EntityTypeID]) REFERENCES [entity].[EntityType] ([EntityTypeID])
);

